import React, {PropTypes, Component} from 'react';
import lyby from '../../util';

export default class App extends Component {
    _click(){
        // let clientUser = window.returnCitySN || {};
        // let loginUser = lyby.loginUser.getData();
        // if(!this.props.type){
        //     return;
        // }
        // $.ajax({
        //     url: '//node.shijue.me/autoConfig/jsonp/add/vcg_track',
        //     data: {
        //         ip : clientUser.cip || '',
        //         city : clientUser.cname || '',
        //         userid: loginUser.userId || '未登录用户',
        //         type: this.props.type
        //     },
        //     dataType: 'jsonp',
        //     success: function (res) {
        //     }
        // });
    }
    render() {
        return (
            <article className="vcg_track_main" onClick={this._click.bind(this)}>
                {this.props.children}
            </article>
        );
    }
}

App.propTypes = {
    children: PropTypes.element,
    type : PropTypes.string
};
